package cn.jbooter.restweb.autoconfigure.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;

import cn.jbooter.restweb.autoconfigure.controller.CaptchaController;
import cn.jbooter.restweb.autoconfigure.controller.CodeController;
import cn.jbooter.restweb.autoconfigure.controller.ShiroController;

/**
 * 对外暴露的公共controller
 * @author hejian
 *
 */
public class FrameControllerConfigure {

	/**
	 * 验证码控制器
	 * @return
	 */
	@Bean
	@ConditionalOnMissingBean
	public CaptchaController captchaController() {
		return new CaptchaController();
	}
	
	/**
	 * 码表控制器
	 * @return
	 */
	@Bean
	@ConditionalOnMissingBean
	public CodeController codeController() {
		return new CodeController();
	}
	
	/**
	 * 权限控制器
	 * @return
	 */
	@Bean
	@ConditionalOnMissingBean
	public ShiroController shiroController() {
		return new ShiroController();
	}
	
	
}
